/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cx1.model.utils;

import java.io.Serializable;
import org.apache.commons.lang.StringUtils;

/**
 *
 * @author ECH
 */
public class EmailInvitee extends Invitee implements Serializable {
    
    private static final long serialVersionUID = 1;
    
    private boolean processed = false;
    
    public EmailInvitee() {
        
    }
    
    public EmailInvitee(String name, String email, String mobile) {
        super(name, email, mobile);
    }

    public boolean isProcessed() {
        return processed;
    }

    public void setProcessed(boolean processed) {
        this.processed = processed;
    }
        
    @Override
    public boolean equals(Object obj) {
        boolean equals = false;
        try {
            String email1 = this.getEmail();
            String email2 = ((EmailInvitee)obj).getEmail();

            if (StringUtils.equalsIgnoreCase(email1.trim(), email2.trim())) {
                equals = true;
            }               
        } catch (Exception ex) { }     
        return equals;
    }

    @Override
    public int hashCode() {
        return 1; 
    }
}
